package com.haomi.model;

import java.sql.Timestamp;

/**
 * UserId entity. @author MyEclipse Persistence Tools
 */

public class UserId implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String password;
	private Integer gender;
	private Timestamp birthday;
	private String email;
	private String signature;
	private String school;
	private String nick;

	// Constructors

	/** default constructor */
	public UserId() {
	}

	/** minimal constructor */
	public UserId(Integer id, String name, String password, Integer gender,
			String nick) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.gender = gender;
		this.nick = nick;
	}

	/** full constructor */
	public UserId(Integer id, String name, String password, Integer gender,
			Timestamp birthday, String email, String signature, String school,
			String nick) {
		this.id = id;
		this.name = name;
		this.password = password;
		this.gender = gender;
		this.birthday = birthday;
		this.email = email;
		this.signature = signature;
		this.school = school;
		this.nick = nick;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getGender() {
		return this.gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public Timestamp getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Timestamp birthday) {
		this.birthday = birthday;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSignature() {
		return this.signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}

	public String getSchool() {
		return this.school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getNick() {
		return this.nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserId))
			return false;
		UserId castOther = (UserId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getName() == castOther.getName()) || (this.getName() != null
						&& castOther.getName() != null && this.getName()
						.equals(castOther.getName())))
				&& ((this.getPassword() == castOther.getPassword()) || (this
						.getPassword() != null
						&& castOther.getPassword() != null && this
						.getPassword().equals(castOther.getPassword())))
				&& ((this.getGender() == castOther.getGender()) || (this
						.getGender() != null
						&& castOther.getGender() != null && this.getGender()
						.equals(castOther.getGender())))
				&& ((this.getBirthday() == castOther.getBirthday()) || (this
						.getBirthday() != null
						&& castOther.getBirthday() != null && this
						.getBirthday().equals(castOther.getBirthday())))
				&& ((this.getEmail() == castOther.getEmail()) || (this
						.getEmail() != null
						&& castOther.getEmail() != null && this.getEmail()
						.equals(castOther.getEmail())))
				&& ((this.getSignature() == castOther.getSignature()) || (this
						.getSignature() != null
						&& castOther.getSignature() != null && this
						.getSignature().equals(castOther.getSignature())))
				&& ((this.getSchool() == castOther.getSchool()) || (this
						.getSchool() != null
						&& castOther.getSchool() != null && this.getSchool()
						.equals(castOther.getSchool())))
				&& ((this.getNick() == castOther.getNick()) || (this.getNick() != null
						&& castOther.getNick() != null && this.getNick()
						.equals(castOther.getNick())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getName() == null ? 0 : this.getName().hashCode());
		result = 37 * result
				+ (getPassword() == null ? 0 : this.getPassword().hashCode());
		result = 37 * result
				+ (getGender() == null ? 0 : this.getGender().hashCode());
		result = 37 * result
				+ (getBirthday() == null ? 0 : this.getBirthday().hashCode());
		result = 37 * result
				+ (getEmail() == null ? 0 : this.getEmail().hashCode());
		result = 37 * result
				+ (getSignature() == null ? 0 : this.getSignature().hashCode());
		result = 37 * result
				+ (getSchool() == null ? 0 : this.getSchool().hashCode());
		result = 37 * result
				+ (getNick() == null ? 0 : this.getNick().hashCode());
		return result;
	}

}